package com.principle.mediator;

public class CoffeeMachine extends Colleague{
    public CoffeeMachine(Mediator mediator, String name) {
        super(mediator, name);
        mediator.Register(name,this);
    }

    @Override
    public void sendMessage(int stateChange) {
        this.GetMediator().GetMessage(stateChange,this.name);
    }

    public void startCoffee() {
        System.out.println("咖啡机打开");
    }
}
